import java.util.Scanner;

public class Job01 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int Max = 0;
        int Min = 101;
        float avg = 0;
        int num = 0;
        for (int i = 1; i <= 3; i++) {
            System.out.println("第" +i+ "个班的成绩");
            for (int j = 1; j <= 5; j++) {
                System.out.print("请输入第" +j+ "学生成绩:");
                int sum = input.nextInt();
                if (j==1){
                    Max = sum;
                    Min = sum;
                }
                num += sum;
                if (Max < sum){
                    Max = sum;
                }
                if (Min > sum){
                    Min = sum;
                }
                if (j==5){
                    avg = num/j;
                    System.out.println("总分:" +num+ ",平均分:" +avg+ ",最大值:" +Max+ ",最小值:" +Min);
                    num=0;
                }
            }
        }
    }
}
